import React from 'react';
import PropTypes from 'prop-types';
import cn from 'classnames';
import s from './Text.module.css';

function Text({ className, value, primary }) {
	return (
		<span className={cn(className, s.text, { [s.primary]: primary })}>
			{value}
		</span>
	);
}

Text.propTypes = {
	className: PropTypes.string,
	value: PropTypes.node.isRequired,
	primary: PropTypes.bool,
};
Text.defaultProps = {
	className: '',
	value: '',
	primary: false,
};

export default Text;
